<?php
class ItemBuyAction extends SzAbstractAction
{
    protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT
    );

    /**
     * buy item
     *
     * @param int $userId
     * @param int $itemDefId
     * @param int $count
     * @return SzResponse
     */
    public function execute($userId, $itemDefId, $count)
    {
        return $this->buildResponse(
            ItemService::get()->buy($userId, $itemDefId, $count)
        );
    }
}